const { Service } = require('egg')
const { tableToList } = require('../utils/tools')

module.exports = class emptyroomService extends Service {
  /**
   * 爬取空闲教室
   * @param {string} term 学期
   * @param {string} zc *
   * @param {string} xq *
   * @param {string} jxl *
   * @param {string} zc * 周次
   * @param {string} xq * 星期
   * @param {string} jxl * 教学楼
   * @param {string} schoolId 校区id
   * @return {Array} *
   */
  // term, zc, xq, jxl
  async table(term, zc, xq, jxl) {
    const Cookie = this.ctx.state.Cookie
    let time = Date.now()
    const api1 = `${this.ctx.state.baseUrl}/eams/classroom/apply/std-activity.action?_=${time}`
    const resa1 = await this.ctx.curl(api1, {
      method: 'GET',
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    time = Date.now()
    const api2 = `${this.ctx.state.baseUrl}/eams/static/scripts/itemSelect.js?_=${time}`
    const resa2 = await this.ctx.curl(api2, {
      method: 'GET',
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    time = Date.now()
    const api3 = `${this.ctx.state.baseUrl}/eams/classroom/apply/std-activity!search.action?_=${time}`
    const resa3 = await this.ctx.curl(api3, {
      method: 'GET',
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    time = Date.now()
    const apiUrlBefore = `${this.ctx.state.baseUrl}/eams/classroom/apply/free.action?&_=${time}`
    const resBefore = await this.ctx.curl(apiUrlBefore, {
      method: 'GET',
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    if (resBefore.status !== 200) { return { 1: 1 } }
    // no.1
    const apiUrl = `${this.ctx.state.baseUrl}/eams/classroom/apply/free!search.action`
    const res = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '1',
        timeEnd: '2',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem1 = []
    if (res.status === 200) {
      try {
        const tableList1 = tableToList(res.data.toString(), '#grid15320024301_data')
        tem1 = []
        tableList1.forEach((e, i) => {
          if (i > -1 && i !== tableList1.length) tem1.push(tableList1[i][1].split('，').filter((item) => item !== ''))
        })
        console.log('tem1', tem1)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.2
    const apiUrl1 = `${this.ctx.state.baseUrl}/eams/classroom/apply/free!search.action`
    const res1 = await this.ctx.curl(apiUrl1, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '3',
        timeEnd: '4',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem2 = []
    // console.log('res1.status', res1.status)
    if (res1.status === 200) {
      try {
        console.log('res1.data.toString()', res1.data.toString())
        const tableList2 = tableToList(res1.data.toString(), '#grid15320024301_data')
        tem2 = []
        tableList2.forEach((e, i) => {
          if (i > -1 && i !== tableList2.length) tem2.push(tableList2[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem2', tem2)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.3
    const res2 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '5',
        timeEnd: '6',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem3 = []
    if (res.status === 200) {
      try {
        const tableList3 = tableToList(res2.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem3 = []
        tableList3.forEach((e, i) => {
          if (i > -1 && i !== tableList3.length) tem3.push(tableList3[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem3', tem3)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.4
    const res3 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '7',
        timeEnd: '8',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem4 = []
    if (res.status === 200) {
      try {
        const tableList4 = tableToList(res3.data.toString(), '#grid15320024301_data')
        tem4 = []
        tableList4.forEach((e, i) => {
          if (i > -1 && i !== tableList4.length) tem4.push(tableList4[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem4', tem4)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.5
    const res4 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '9',
        timeEnd: '10',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem5 = []
    if (res.status === 200) {
      try {
        const tableList5 = tableToList(res4.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem5 = []
        tableList5.forEach((e, i) => {
          if (i > -1 && i !== tableList5.length) tem5.push(tableList5[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem5', tem5)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.6
    const res5 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '11',
        timeEnd: '12',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem6 = []
    if (res.status === 200) {
      try {
        const tableList6 = tableToList(res5.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem6 = []
        tableList6.forEach((e, i) => {
          if (i > -1 && i !== tableList6.length) tem6.push(tableList6[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem6', tem6)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.7
    const res6 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '13',
        timeEnd: '14',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem7 = []
    if (res.status === 200) {
      try {
        const tableList7 = tableToList(res6.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem7 = []
        tableList7.forEach((e, i) => {
          if (i > -1 && i !== tableList7.length) tem7.push(tableList7[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem7', tem7)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.8
    const res7 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '1',
        timeEnd: '4',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem8 = []
    if (res.status === 200) {
      try {
        const tableList8 = tableToList(res7.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem8 = []
        tableList8.forEach((e, i) => {
          if (i > -1 && i !== tableList8.length) tem8.push(tableList8[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem8', tem8)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.9
    const res8 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '7',
        timeEnd: '10',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem9 = []
    if (res.status === 200) {
      try {
        const tableList9 = tableToList(res8.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem9 = []
        tableList9.forEach((e, i) => {
          if (i > -1 && i !== tableList9.length) tem9.push(tableList9[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem9', tem9)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.10
    const res9 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '5',
        timeEnd: '6',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem10 = []
    if (res.status === 200) {
      try {
        const tableList10 = tableToList(res9.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem10 = []
        tableList10.forEach((e, i) => {
          if (i > -1 && i !== tableList10.length) tem10.push(tableList10[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem10', tem10)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.11
    const res10 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '11',
        timeEnd: '14',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem11 = []
    if (res.status === 200) {
      try {
        const tableList11 = tableToList(res10.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem11 = []
        tableList11.forEach((e, i) => {
          if (i > -1 && i !== tableList11.length) tem11.push(tableList11[i][1].split('，').filter((item) => item !== ''))
        })
        // console.log('tem11', tem11)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // no.12
    const res11 = await this.ctx.curl(apiUrl, {
      method: 'POST',
      data: {
        'classroom.type.id': '',
        'classroom.campus.id': '',
        'classroom.building.id': '',
        seats: '',
        'classroom.name': '',
        'cycleTime.cycleCount': '1', // 时间周期天数
        'cycleTime.cycleType': '1', // 时间周期方式（天1，周2）
        'cycleTime.dateBegin': '2024-05-19', // 开始时间
        'cycleTime.dateEnd': '2024-05-19', // 结束时间
        roomApplyTimeType: '0', // 查询方式（小节0，时间1）
        timeBegin: '1',
        timeEnd: '14',
      },
      headers: {
        Cookie,
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // eslint-disable-next-line max-len
        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Mobile Safari/537.36',
      },
      timeout: 10000,
    })
    let tem12 = []
    if (res.status === 200) {
      try {
        const tableList12 = tableToList(res11.data.toString(), '#grid15320024301_data')
        // console.log('tableList1', tableList1)
        tem12 = []
        tableList12.forEach((e, i) => {
          if (i > -1 && i !== tableList12.length) tem12.push(tableList12[i][1].split('，').filter((item) => item !== ''))
        })
        console.log('tem12', tem12)
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    // tem定义
    if (res.status === 200) {
      try {
        const tem = []
        tem.push(tem1)
        tem.push(tem2)
        tem.push(tem3)
        tem.push(tem4)
        tem.push(tem5)
        tem.push(tem6)
        tem.push(tem7)
        tem.push(tem8)
        tem.push(tem9)
        tem.push(tem10)
        tem.push(tem11)
        tem.push(tem12)
        for (let i = 0; i < tem.length; i++) {
          // 直接输出数组元素，不进行转换
        }
        // console.log('tem', tem)
        // 创建一个对象，并将tem1数组与'1-2'键关联起来
        const flattenedTem1 = tem1.flat()
        const associatedObject1 = {
          '1-2': flattenedTem1,
        }
        console.log(associatedObject1)
        const flattenedTem2 = tem2.flat()
        const associatedObject2 = {
          '3-4': flattenedTem2,
        }
        console.log(associatedObject2)
        const flattenedTem3 = tem3.flat()
        const associatedObject3 = {
          '5-6': flattenedTem3,
        }
        console.log(associatedObject3)
        const flattenedTem4 = tem4.flat()
        const associatedObject4 = {
          '7-8': flattenedTem4,
        }
        console.log(associatedObject4)
        const flattenedTem5 = tem5.flat()
        const associatedObject5 = {
          '9-10': flattenedTem5,
        }
        console.log(associatedObject5)
        const flattenedTem6 = tem6.flat()
        const associatedObject6 = {
          '11-12': flattenedTem6,
        }
        console.log(associatedObject6)
        const flattenedTem7 = tem7.flat()
        const associatedObject7 = {
          '13-14': flattenedTem7,
        }
        console.log(associatedObject7)
        const flattenedTem8 = tem8.flat()
        const associatedObject8 = {
          上午: flattenedTem8,
        }
        console.log(associatedObject8)
        const flattenedTem9 = tem9.flat()
        const associatedObject9 = {
          下午: flattenedTem9,
        }
        console.log(associatedObject9)
        const flattenedTem10 = tem10.flat()
        const associatedObject10 = {
          中午: flattenedTem10,
        }
        console.log(associatedObject10)
        const flattenedTem11 = tem11.flat()
        const associatedObject11 = {
          晚上: flattenedTem11,
        }
        console.log(associatedObject11)
        const flattenedTem12 = tem12.flat()
        const associatedObject12 = {
          全天: flattenedTem12,
        }
        console.log(associatedObject12)
        // eslint-disable-next-line max-len
        const all = [associatedObject1, associatedObject2, associatedObject3, associatedObject4, associatedObject5, associatedObject6, associatedObject7, associatedObject8, associatedObject9, associatedObject10, associatedObject11, associatedObject12]
        return {
          campus_id: this.ctx.state.campusId,
          // school_id: schoolId,
          // zc,
          // xq,
          // building: jxl.label,
          data: all,
        }
      } catch (err) {
        console.log('err', err)
        throw err
      }
    }
    return {}
  }
}
